package com.hcs.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author hcs
 * @since 2025-01-12 10:06
 */
@Getter
@Setter
@TableName("coupon")
@Schema(name = "Coupon", description = "优惠券表")
public class Coupon {

    // 主键
    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    // 优惠券编码
    @Schema(description = "优惠券编码")
    @TableField("code")
    private String code;

    // 优惠券面值
    @Schema(description = "优惠券面值")
    @TableField("discount")
    private BigDecimal discount;

    // 有效期
    @Schema(description = "有效期")
    @TableField("valid_from")
    private Date validFrom;

    // 过期时间
    @Schema(description = "过期时间")
    @TableField("valid_to")
    private Date validTo;

    // 状态
    @Schema(description = "状态")
    @TableField("status")
    private Byte status;

    // 创建时间
    @Schema(description = "创建时间")
    @TableField("created_at")
    private Date createdAt;

    // 更新时间
    @Schema(description = "更新时间")
    @TableField("updated_at")
    private Date updatedAt;
}
